#!/bin/bash
# DEPRECATED See UuidRename.sh
# Start dir = $
#convert 
#	$1 == 1 return		12ddfdc0-dedb-11d3-b844-0008c73f25e8
# to
#	$1 == 2	return { 0x12ddfdc0, 0xdedb, 0x11d3, { 0xb8, 0x44, 0x00, 0x08, 0xc7, 0x3f, 0x25, 0xe8} };

cwd=$PWD

#UuidAWK=`dirname $0`/Uuid.awk
UuidAWK=Uuid.awk

# if argument is 1 return the generated uuid
if [ "$1" -eq "1" ] ;
then
uuidgen > uuid.txt
uuidCPP=`cat uuid.txt`
echo $uuidCPP
fi

# if argument is 2 return uuid in framework.iid/ ( C Data Structure) format
if [ $1 -eq 2 ] ;
then
uuidIID=`awk -F- -f $UuidAWK uuid.txt`
echo $uuidIID
fi

